<div id="content">

    <? if(is_array($response)){?>
    <div class="response">
        <span class="<?=$response["class"]?>"><?=$response["msg"]?></span>
    </div>
    <? } ?>

    <a class="button" href="<?=site_url('admin/gallery/add')?>" style="float:right">ADD IMAGE</a>
    <h1>Inspirational Gallery images</h1>

    <? foreach($images as $image){ 
        $class = ($image['Active_Gallery']=='1')?'active':'inactive';
    ?>

        <div class="list_block search <?=$class?>">    

            <div style="width:80%; float:left">
            <img src="<?=base_url().UPLOADS_FOLDER.INSPIRATIONALGALLERY_IMG_FOLDER.$image['Image_Gallery']?>" style="max-width:100%" />
            </div>

            <div class="buttons_block" style="float:left; margin-left:10px">
                <? if ($image['Active_Gallery'] == 1){ ?>            
                <a href="<?=site_url('admin/gallery/deactivate/'.$image['id_Gallery'])?>" class="button">deactivate</a>
                <? } else { ?> 
                <a href="<?=site_url('admin/gallery/activate/'.$image['id_Gallery'])?>" class="button">activate</a>
                <? } ?>
                <a href="<?=site_url('admin/gallery/remove/'.$image['id_Gallery'])?>" class="button">delete</a>                                               
            </div>

        </div>

    <? } ?>

</div>